<script setup lang="ts">

import SysDialog from "@/components/SysDialog.vue";
import useDialog from "@/hooks/useDialog.ts";
//获取属性 只有在vue3中能这样写 vue2不行
const {dialog, onConfirm, onClose, onShow} = useDialog();
</script>

<template>
  <h1>首页管理</h1>
  <el-button type="primary" size="default" @click="onShow">新增</el-button>
  <SysDialog
      :title="dialog.title"
      :visible="dialog.visible"
      :height="dialog.height"
      :width="dialog.width"
      @onClose="onClose"
      @onConfirm="onConfirm"
  >
    <template v-slot:content>
      弹窗测试
    </template>
  </SysDialog>
</template>

<style scoped>

</style>